package day20170414.homework.dao.impl;

import day20170414.homework.dao.SeekValueDao;

public class SeekValueDaoImpl implements SeekValueDao {
	
	/**
	 * 加法
	 */
	@Override
	public int add(int number, int number2) {
		return number + number2;
	}
	
	/**
	 * 减法
	 */
	@Override
	public int reduce(int number, int number2) {
		return number - number2;
	}
	
	/**
	 * 乘法
	 */
	@Override
	public int ride(int number, int number2) {
		if(number == 0 || number2 == 0){
			System.out.println("乘法不能输入0...");
			return 0;
		}else{
			return number * number2;
		}
	}

	/**
	 * 除法
	 */
	@Override
	public int except(int number, int number2) {
		if(number == 0 || number2 == 0){
			System.out.println("除法不能输入0...");
			return 0;
		}else{
			return number / number2;
		}
	}
	
	/**
	 * 求模
	 */
	@Override
	public int mod(int number, int number2) {
		return number % number2;
	}

}
